package cn.bugDance.domain.rebate.event;

import cn.bugDance.domain.rebate.model.valobj.RebateDataVO;
import cn.bugDance.types.response.BaseEvent;
import org.apache.commons.lang3.RandomStringUtils;

import java.util.Date;

public class RebateEvent extends BaseEvent<RebateDataVO> {

    public static String topic = "rebateTopic";

    public static RebateEvent create(RebateDataVO rebateDataVO){
        RebateEvent rebateEvent = new RebateEvent();
        rebateEvent.setId(RandomStringUtils.randomNumeric(6));
        rebateEvent.setTimestamp(new Date());
        rebateEvent.setData(rebateDataVO);
        return rebateEvent;
    }


}
